'Declaration Public Overloads Shared Function LiveAggregate (Of TSource,TAccumulate)( _ ByVal source As View(Of TSource), _ ByVal seed As TAccumulate, _ ByVal funcAdd As Expression(Of Func(Of TAccumulate,TSource,TAccumulate)), _ ByVal funcRemove As Expression(Of Func(Of TAccumulate,TSource,TAccumulate)), _ ByVal funcRemoveDefined As Expression(Of Func(Of TAccumulate,TSource,Boolean)) _ ) As AggregationView(Of TSource,TAccumulate)
public static AggregationView<TSource,TAccumulate> LiveAggregate<TSource,TAccumulate>( View<TSource> source, TAccumulate seed, Expression<Func<TAccumulate,TSource,TAccumulate>> funcAdd, Expression<Func<TAccumulate,TSource,TAccumulate>> funcRemove, Expression<Func<TAccumulate,TSource,bool>> funcRemoveDefined )
Parameters
- source
- A view to aggregate over.
- seed
- The initial accumulator value.
- funcAdd
- An accumulator function to be invoked on each element that is added to the source view.
- funcRemove
- A function to be applied to the accumulated value and to an element to obtain the changed accumulated value, when an element is removed from the source view.
- funcRemoveDefined
- A function used to determine whether funcRemove must be applied when an element is removed from the source view, or the accumulated value is not affected by its removal.
Type Parameters
- TSource
- The type of the elements of source.
- TAccumulate
- The type of the accumulator value.
Return Value
A view representing the final accumulator value.